package com.jy.modules.cims.common;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import com.alibaba.fastjson.JSON;
import com.jy.modules.cims.common.sysUtils.PropertyUtil;

/**
 * 常量定义
 */
public class CimsConstant {
	
	

	public static Map<String, String> map = new LinkedHashMap<String, String>();
	public static Map<String, String> mapProductType = new LinkedHashMap<String, String>();
	// 流水号类型设置区
	public static String BIZNO_TYPE_CRTO = "crto"; // 债权转让流水类型
	public static String BIZNO_TYPE_LOAN = "loan"; // 贷款转出流水类型
	public static String BIZNO_TYPE_QUOTA = "quota"; // 额度流水类型
	public static String BIZNO_TYPE_DEAL = "deal"; // 交易结算流水类型
	public static String BIZNO_TYPE_BPFILE = "bpfile";// 报盘文件流水类型
	public static String BIZNO_TYPE_REDEMPTION = "redempt";// 赎回交易流水类型
	public static String BIZNO_TYPE_CRTI = "crti"; // 债权受让流水类型
	public static String BIZNO_TYPE_CRSR = "crsr"; // 受让债权类型
	public static String BIZNO_TYPE_SRSH = "srsh"; // 受让债权类型
	public static String BIZNO_TYPE_SETTLE = "settle"; // 结算流水类型

	// 流水号前缀设置区
	public static String BIZNO_PF_CRTO = "zz"; // 债权转让流水号前缀
	public static String BIZNO_PF_LOAN = "dz"; // 贷款转出流水号前缀
	public static String BIZNO_PF_QUOTA = "ed"; // 额度流水号前缀
	public static String BIZNO_PF_DEAL = "jy"; // 交易结算流水号前缀
	public static String BIZNO_PF_BPFILE = "bp";// 报盘文件流水前缀
	public static String BIZNO_PF_REDEMPTION = "sh";// 赎回交易流水前缀
	public static String BIZNO_PF_CRTI = "zr"; // 债权转让流水号前缀
	public static String BIZNO_PF_CRSR = "sr"; // 受让债权前缀
	public static String BIZNO_PF_SRSH = "srsh"; // 受让债权前缀
	public static String BIZNO_PF_SETTLE = "js"; // 结算流水号前缀

	// 以下为各系统ID列表，auth-client.xml auth-service.xml 配置值需与此一致
	public static String SYSID_CORE = "interact.sysid.core"; // 核心系统ID属性key
	public static String SYSID_BEFLOAN = "interact.sysid.befloan"; // 贷前系统ID属性key
	
	public static String SYSID_COLLATERAL = "interact.sysid.collateral"; // 抵押品系统ID属性key
	
	public static String SYSID_MASTERDATA = "interact.sysid.base_data_sys"; // 主数据系统ID属性key

	// 合作机构业务交易编码列表
	public static String BUSICODE_QUOTAAPPLY = "BPB01"; // 额度申请
	
	//合作机构贷款类型
	public static String COOPERORG_TYPE_ONE = "03"; // 新天信托
	public static String COOPERORG_TYPE_TWO = "04"; // 互联网

	// 额度申请类型
	public static String QUOTATYPE_LOAN = "01"; // 贷款
	public static String QUOTATYPE_CR = "02"; // 债权
	
	/**
	 * 01撤销修改撤销状态：02";撤销并且释放额度
	 */
	public static String QUOTABACK_01 = "01";//撤销修改撤销状态
	public static String QUOTABACK_02 = "02";//撤销并且释放额度
	
	// 区分合约类型
	public static String CONTRACT_LOAN = "03,04"; // 贷款
	public static String CONTRACT_CREDIT = "01,02"; // 债权

	// 额度主表申请状态
	public static String QUOTA_STATUS_ST = "00"; // 申请中
	public static String QUOTA_STATUS_ED = "01"; // 完成
	public static String QUOTA_STATUS_UNLOCK = "02"; // 释放
	public static String QUOTA_STATUS_WAIT_AUDIT = "03"; // 待审核
	
	//释放来源：1-债权交易；2-额度
	public static String CREDIT_UNLOCK_SOURCE ="1";
	public static String QUOTA_UNLOCK_SOURCE ="2";
	
	//是否上传影像文件
	public static String IS_UPLOAD_IMAGE_FILES ="01";
	public static String NO_UPLOAD_IMAGE_FILES ="02";
	
	//贷款明细额度相关状态显示
	public static String QUOTA_LOAN_DETAI_STATUS_NOT ="00";//未使用
	public static String QUOTA_LOAN_DETAI_STATUS_RETURN ="10";//已经释放

	// 交易与额度申请明细状态
	public static String QUOTA_DETAIL_STATUS_NEW = "01"; // 申请
	public static String QUOTA_DETAIL_STATUS_LOCK = "02"; // 交易占用
	public static String QUOTA_DETAIL_STATUS_INVALID = "03"; // 作废
	
	//额度申请状态
	public static String QUOTA_STATUS_FINISH = "01"; // 已完成
	public static String QUOTA_STATUS_RELEASE = "02"; // 已释放
	public static String QUOTA_STATUS_APPLY = "00"; // 申请中

	// 交易状态
	public static String DEAL_STATUS_CREATE = "01"; // 新建
	public static String DEAL_STATUS_WAY = "02"; // 在途
	public static String DEAL_STATUS_FINISH = "03"; // 交易完成
	public static String DEAL_STATUS_MONTH_BACK = "04"; // 待购买
	public static String DEAL_STATUS_SECOND_PURCHASE = "05"; // 已购买
	public static String DEAL_STATUS_FUNDOUT_LOSE_M = "06"; // 我司拒绝放款
	
	//债权授让结算状态
	public static String DEAL_SETTLE_STATUS = "2";//已结算
	public static String DEAL_SETTLE_TYPE = "1";
	
	
	//费用归属
	public static String COST_SETTLEMENT_COMPANY = "01";//财务公司
	public static String COST_SETTLEMENT_CORE = "02";//结算中心
	public static String COST_SETTLEMENT_OTHER = "03";//其他
	
	//费用业务场景
	public static String COST_TYPE_CREDIT_OUT = "01";//债权转让结算
	public static String COST_TYPE_CREDIT_REDEEM = "02";//债权赎回结算
	public static String COST_TYPE_CREDIT_SETTLE = "03";//债权月还结算
	
	// 贷款状态
	public static String LOAN_WAY = "01"; // 在途
	public static String LOAN_CONFIRM_WIN = "02"; // 审批通过
	public static String LOAN_CONFIRM_LOSE = "03"; // 审批拒绝
	public static String LOAN_FUNDOUT_WIN = "04"; // 放款成功
	public static String LOAN_FUNDOUT_LOSE = "05"; // 放款失败
	public static String LOAN_FUNDOUT_LOSE_M = "06"; // 我司拒绝放款
	public static String LOAN_FUNDOUT_RJT = "07"; // 合同废弃
	public static String LOAN_FUNDOUT_LB = "08"; //流标 
	public static String LOAN_FUNDOUT_SIGN = "09"; //签章完毕
	
	// 交易类型
	public static String DEAL_TYPE_CREDIT_OUT = "01"; // 债权转让交易
	public static String DEAL_TYPE_CREDIT_IN = "02"; // 债权受让交易
	public static String DEAL_TYPE_LOAN_OUT = "03"; // 贷款转出交易
	public static String DEAL_TYPE_LOAN_IN = "04"; // 贷款转入交易
	public static String DEAL_TYPE_SETTLE = "05"; // 结算交易（无此类型，数据字典不需要配置）
	public static String DEAL_TYPE_BAIL_BOND = "06"; // 担保金（无此类型，数据字典不需要配置）
	public static String DEAL_TYPE_RISK_FUND = "07"; // 风险金（无此类型，数据字典不需要配置）
	public static String DEAL_TYPE_CREDIT_REDEEM = "08"; // 债权转让赎回交易
	public static String DEAL_TYPE_SECOND_PURCHASE = "09"; // 二次购买
	public static String DEAL_TYPE_MONTH_BACK = "10"; // 债权转让正常交易
	public static String DEAL_TYPE_CREDIT_SETTLE = "11"; // 债权转让异常交易
	public static String DEAL_TYPE_LOAN_MONTH_BACK = "12"; // 贷款转出正常交易
	public static String DEAL_TYPE_LOAN_CREDIT_SETTLE = "13"; // 贷款转出异常交易
	public static String DEAL_TYPE_LOAN_CREDIT_REDEEM = "14"; // 贷款转出赎回交易
	public static String DEAL_TYPE_CREDIT_NORMAL_SETTLE_REC = "15"; // 债权受让正常交易
	public static String DEAL_TYPE_CREDIT_ABNORMAL_SETTLE_REC = "16"; // 债权受让异常交易
	public static String DEAL_TYPE_TRANSFER_CREDIT_REDEEM = "17"; // 债权受让赎回交易
	
	//excel数据存储路径
	public static String SESSION_IMPORT_DATA_PATH = "01"; // session
	public static String REDIS_IMPORT_DATA_PATH = "02"; // redis
	
	// 数据有效状态
	public static String DATE_STATUS_VALID = "1"; // 有效
	public static String DATE_STATUS_INVALID = "0"; // 无效
	
	//房贷先息后本2（部分先息后本）
	public static BigDecimal FIRST_YEAR_PARAM = BigDecimal.valueOf(0.3);//第一年系数
	public static BigDecimal SECOND_YEAR_PARAM = BigDecimal.valueOf(0.7);//第二年系数
	public static BigDecimal THIRD_YEAR_PARAM = BigDecimal.valueOf(0.4);//第三年系数
	public static int TERM_FIRST = 24;
	public static int TERM_SECOND = 36;

	// 贷款释放类型
	public static String LOAN_OPER_TYPE_CC = "3"; // 取消额度申请
	public static String LOAN_OPER_TYPE_DE = "4"; // 日终释放额度
	public static String LOAN_OPER_TYPE_LB = "5"; // 人工驳回
	// 分页参数
	public static int DEFAULT_PAGE_SIZE = 3;// 分页查询默认条数

	// 接口调用个数
	public static int INTERACT_NUM_ONE = 1; //
	public static int INTERACT_NUM_TWO = 2; //
	
	//债权受让(交易流水表，接口状态）
	public static String INTERFACE_STATUS_NEW = "0";//未处理
	public static String INTERFACE_STATUS_RUN = "1";//处理中
	public static String INTERFACE_STATUS_TRUE = "2";//处理完成
	

	// 接口被执行状态
	public static String INTERACT_IMPL_TRUE = "1"; // 已执行
	public static String INTERACT_IMPL_FALSE = "0"; // 未执行
	public static String INTERACT_IMPL_ING = "2"; // 执行中

	// 接口执行最大出错次数
	public static int MAX_FAILURE_COUNTER = 5;

	// 债权/保证金/费用/风险金结算状态
	public static String SETTLESTATUS_NC = "1";// 新建
	public static String SETTLESTATUS_ST = "2";// 未结
	public static String SETTLESTATUS_ED = "3";// 已结
	
	//结算状态
	public static String COST_STATUS_WJ = "00";//未结算
	/** 待结算  */
	public static String COST_STATUS_DJ = "01";
	public static String COST_STATUS_SQ = "02";//申请结算
	public static String COST_STATUS_YJ = "03";//已结算
	public static String COST_STATUS_BH = "04";//驳回

	//交易-结算状态  （待结算，部分结算，全部结算）
	public static String DEAL_COST_STATUS_DJS = "00";
	public static String DEAL_COST_STATUS_BFJS = "01";
	public static String DEAL_COST_STATUS_QBJS = "02";
	
	// excel导出固定字段列数
	public static int TEMPLATE_COLUMN_COUNT = 5;

	// 合作机构债权状态
	/**在途*/
	public static String CREDIT_STATUS_WAY = "01";
	/**已确认*/
	public static String CREDIT_STATUS_WIN = "02";
	/**取消*/
	public static String CREDIT_STATUS_LOSE = "03";
	/**泯灭*/
	public static String CREDIT_STATUS_END = "04";
	/**赎回*/
	public static String CREDIT_STATUS_RED = "05";
	
	
	// 核心债权状态
	public static String CORE_CREDIT_STATUS_TRANSFER = "01"; //贷款转出 正常贷款
	public static String CORE_CREDIT_STATUS_LOANREDEEM = "86"; //贷款回购
	public static String CORE_CREDIT_STATUS_WAY = "10";// 已转让在途
	public static String CORE_CREDIT_STATUS_WIN = "11";// 已确认转让
	public static String CORE_CREDIT_STATUS_RED = "12";// 已赎回
	public static String CORE_CREDIT_STATUS_SETTLE_AHEAD = "95";// 提前结清
	public static String CORE_CREDIT_STATUS_SETTLE_CANCEL = "96";// 撤销
	public static String CORE_CREDIT_STATUS_SETTLE_NORMAL = "97";// 正常结清
	public static String CORE_CREDIT_STATUS_SETTLE_RECOMBINE = "88";// 债权重组
	public static String CORE_CREDIT_STATUS_SETTLE_EXHIBITION = "89";// 展期结清
	public static String CORE_CREDIT_STATUS_SETTLE_CHANGEDATE = "90";// 还款日变更
	
	//API接口审批，放款状态
	public static String JIEYUE_RESULT_API_DEFAULT = "00"; //默认
	/** * 审批成功 */
	public static String JIEYUE_RESULT_API_AUDIT_SUCCESS = "02";
	/** * 审批拒绝 */
	public static String JIEYUE_RESULT_API_AUDIT_REFUSE = "03";
	/** * 放款成功 */
	public static String JIEYUE_RESULT_API_LOAN_SUCCESS = "04";
	/** * 放款失败 */
	public static String JIEYUE_RESULT_API_LOAN_REFUSE = "05";
	
	
	//导出来源
	public static String CREDIT_RESOURCE = "credit";// 债权
	public static String LOAN_RESOURCE = "loan";// 贷款
	public static String REDEMPTION_RESOURCE = "redemption";// 赎回
	public static String BUYBACK_RESOURCE = "buyBack";// 回购
	
	//模板应用场景
	public static String CREDIT_EXPORT_TYPE = "01";// 债权交易
	public static String LOAN_EXPORT_TYPE = "03";// 贷款交易
	//导出字段类型
	public static String COSTOM_EXPORT_TYPE = "03";// 客户
	

	// 债权来源
	public static String CREDIT_SOURCE_CRE = "01"; // 来自债权池 转让编号
	public static String CREDIT_SOURCE_LOA = "02"; // 来自贷款
	/**来自债权受让*/ 
	public static String CREDIT_SOURCE_REC = "03"; 

	// 债权明细赎回状态
	public static String CREDIT_REDEMPTION_CK = "01"; // 可以选择
	public static String CREDIT_REDEMPTION_UNCK = "02"; // 已经选择

	// 债权交互状态中文名
	public static String CREDIT_NAME_WIN = "已卖出"; // 已卖出
	public static String CREDIT_NAME_LOSE = "取消"; // 取消
	public static String CREDIT_IS_IMPORT = "01";// 是否导入01导入02不导入
	
	public static String CREDIT_EACH_STATUS_URL = "02"; // 交易保存成功
	public static String CREDIT_EACH_STATUS_SEND = "03"; // 上传影像资料完毕
	
	// 贷款交互状态
	public static String LOAN_EACH_STATUS_CRE = "01"; // 默认状态
	public static String LOAN_EACH_STATUS_URL = "02"; // 交易保存成功
	public static String LOAN_EACH_STATUS_SEND = "03"; // 上传影像资料完毕
	public static String LOAN_EACH_STATUS_QUERY = "04"; // 发送贷款信息完毕
	public static String LOAN_EACH_STATUS_END = "05"; // 查询审核结果完毕
	public static String LOAN_EACH_STATUS_AUDIT = "08"; // 审批结果通知完毕
	public static String LOAN_EACH_STATUS_CORE = "09"; // 放款查询完毕
	public static String LOAN_EACH_STATUS_ATTACH = "10"; // 铜板街发送附件列表完毕
	public static String LOAN_EACH_STATUS_TBJ_SENDING = "11";//待推送
	public static String LOAN_EACH_STATUS_TBJ_SENDED = "12";//推送完成
	public static String LOAN_EACH_STATUS_XS_SIGN = "13";//签章影像回传完毕
	
	
	// 上传下载文件状态
	public static String DOWNLOAD_FILE_SUCCESS = "01";// 下载文件成功
	public static String DOWNLOAD_FILE_FAIL = "02";// 下载文件失败
	public static String UPLOAD_FILE_SUCCESS = "03";// 上传文件成功
	public static String UPLOAD_FILE_FAIL = "04";// 上传文件失败
	
	//是否整包处理
	public static String PAG_IS_FULL_N = "00";//不按包处理
	public static String PAG_IS_FULL_Y = "01";//按包处理

	// FTP参数设置
	public static int FTP_BUFFER_SIZE = 1024 * 1024 * 10;// 文件缓冲大小
	public static int FTP_DATA_TIMEOUT = 5 * 60 * 1000;// 超时时间
	
	//核心贷款放款结果标示
	public static String CORE_LOAN_RESULT_TYPE_SUCCESS = "SUCC";//放款成功
	public static String CORE_LOAN_RESULT_TYPE_RJT = "RJT";//合同失效
	
	//铜板街贷款审批和放款结果标示
	public static String TBJ_COOPERORG_CODE = "TBJ";//机构编号
	public static String TBJ_AUDIT_RESULT_SUCCESS = "-3";//审批通过
	public static String TBJ_AUDIT_RESULT_FAIL = "-1";//审批未通过
	public static String TBJ_AUDIT_RESULT_ING = "0";//审批中
	public static String TBJ_AUDIT_RESULT_RETURN = "-2";//退回
	public static String TBJ_LOAN_RESULT_SUCCESS = "-3";//放款成功
	public static String TBJ_LOAN_RESULT_FAIL = "-1";//放款失败
	public static String TBJ_LOAN_RESULT_ING = "0";//放款中
	public static String AUDIT_RESULT = "SP";//审批结果
	public static String LOAN_RESULT = "FK";//放款结果
	
	
	//服务费基数
	public static String BASE_SERVICEFEE_MYCREDIT = "01"; //我司债权价值
	public static String BASE_SERVICEFEE_DFCREDIT = "02"; //对方债权价值
	public static String BASE_SERVICEFEE_CONTRACT = "03"; //合同金额
	
	//担保费基数
	public static String BASE_BONDFEE_THISCREDITVALUE = "01"; //当前债权价值
	public static String BASE_BONDFEE_SYBJ = "02"; //剩余本金
	public static String BASE_BONDFEE_SYBX = "03"; //剩余本息
	
	//风险金
	/**合同金额*/
	public static String BASE_RISKFEE_HT = "01";  
	/**放款金额*/
	public static String BASE_RISKFEE_FK = "02";  
	/**剩余本息*/
	public static String BASE_RISKFEE_SYBX = "03"; 
	/**剩余本金*/
	public static String BASE_RISKFEE_SYBJ = "04"; 
	/**交割债券价值*/
	public static String BASE_RISKFEE_JGCREDIT = "05";
	
	/**数据字典数据项*/
	public static String DICT_DATA_NAME = "DICNAME";
	public static String DICT_DATA_CODE = "DICVALUE";
	
	//数据字典编码(证件类型，还款方式)
	public static String DICT_IDTYPE = "IDTYPE";
	public static String DICT_REPAYMENTWAY = "CM_REPAYMENTWAY";
	
	//还款方式
//	public static String DYD_REFUND_TYPE_DEBX = "AC10001";//等额本息
//	public static String DYD_REFUND_TYPE_FDDEBX = "AC10004";//房贷等额本息
//	public static String DYD_REFUND_TYPE_CDDEBX = "AC10007";//车贷等额本息
//	public static String DYD_REFUND_TYPE_FDXXHB = "AC10005";//房贷先息后本
//	public static String DYD_REFUND_TYPE_FDXXHB2 = "AC10008";//房贷先息后本2
//	public static String DYD_REFUND_TYPE_XXHB = "AC10002";//先息后本
	//zhoupeng  还款方式
	/**等额本息*/
	public static String DYD_REFUND_TYPE_DEBX = "RT01";
	/**先息后本*/
	public static String DYD_REFUND_TYPE_XXHB = "RT02";
	/**先息后本2*/
	public static String DYD_REFUND_TYPE_XXHB2 = "RT03";

	//产品类型：(信用贷，车贷，房贷)
	/**信用贷*/
	public static String PRODUCT_TYPE_CREDIT = "01";
	/**车贷*/
	public static String PRODUCT_TYPE_CAR = "02";
	/**房贷*/
	public static String PRODUCT_TYPE_HOUSE = "03";
	/**不存在的产品类型*/
	public static String PRODUCT_TYPE_NOT_EXIST = "00";
	static {
		mapProductType.clear();
		mapProductType.put(CimsConstant.PRODUCT_TYPE_CREDIT, "1");
		mapProductType.put(CimsConstant.PRODUCT_TYPE_HOUSE, "2");
		mapProductType.put(CimsConstant.PRODUCT_TYPE_CAR, "3");
		mapProductType.put(CimsConstant.PRODUCT_TYPE_NOT_EXIST, "0");
	}
	//合同类型(核心)
	/**信用贷*/
	public static String CORE_PRODUCT_TYPE_CREDIT = "1";
	/**房抵贷*/
	public static String CORE_PRODUCT_TYPE_HOUSE = "2";
	/**移交类车贷*/
	public static String CORE_PRODUCT_TYPE_CAR_YJ = "3";
	/**GPS类车贷*/
	public static String CORE_PRODUCT_TYPE_CAR_GPS = "4";
	
	//费用归属（财务，结算中心，其他）
	public static String FEE_AFF_CW = "01";
	public static String FEE_AFF_JS = "02";
	public static String FEE_AFF_QT = "03";
	

	// HttpURLConnection参数设置
	public static int HTTP_URL_CONNECTION_CONNECT_TIMEOUT = 5 * 1000;// 超时时间
	public static String HTTP_URL_REQUEST_PROPERTY_KEY = "User-Agent";// 设置HttpURLConnection请求头里面的属性
	public static String HTTP_URL_REQUEST_PROPERTY_VALUE = "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)";// 设置HttpURLConnection请求头里面的属性

	// 影像文件文件下载方式：1-URL下载；2-FTP下载
	//public static String DOWNLOAD_IMG_MODE_URL = "1";
	//public static String DOWNLOAD_IMG_MODE_FTP = "2";
	
	//数据字典类型
	public static Long DICT_TYPE = 17L;//影像类型
	
	//影像临时文件：文件目录，压缩包
	public static String DIR_TEMP_FILE = "DIR_TEMP_FILE";
	public static String DIR_TEMP_ZIP = "DIR_TEMP_ZIP";
	
	//机构编号：铜板街，华奥信托
	public static String COOPERORGCODE_TBJ = "TBJ";
	public static String COOPERORGCODE_HAXT = "HAXT";
	public static String COOPERORGCODE_JNXD = "JNXD";
	
	//是否全部释放债权
	public static String CREDIT_ISWHOLE = "Y";
	public static String CREDIT_NOWHOLE = "N";
	

	// 系统换行符
	public static String LINE_SEPARATOR = "line.separator";
	// 代付标志
	public static String dfFlag = "F";
	// 好易联回盘文件字符集
	public static String HYL_FILECHARSET = "UTF-8";
	// 下划线
	public static String UNDERLINE = "_";
	// 代付标志
	public static String DFFLAG = "F";
	/**文件类型*/ 
	public static String FILE_TYPE_TXT = ".txt";
	/** 账户类型银行卡*/
	public static String accType_00 = "00";
	/**账户类型存折*/ 
	public static String accType_01 = "01";

	public static String SEPARATOR_COMMA = ",";

	public static String SEPARATOR_AT = "@";

	public static String FILE_VERSION_02 = "02";
	// 异常结清类型
	//public static String ABNORMAL_SETTLE_AHEAD = "01";// 提前结清
	//public static String ABNORMAL_SETTLE_OVERDUE = "02";// 逾期

	// 债权结算状态
	/**已经结算*/ 
	public static String CREDIT_SETTLE_STATUS = "01";

	// 债权结算参数-月还处理方式
	/**全额匹配*/ 
	public static String REPLACE_TYPE_FULL_MATCH = "01";
	/** 本金匹配*/
	public static String REPLACE_TYPE_PRINCIPAL_MATCH = "02";
	/**全额返还*/ 
	public static String REPLACE_TYPE_FULL_RETURN = "03";
		
	/**结算日*/ 
	public static String SETTLE_DAY_1 = "1";
	public static String SETTLE_DAY_2 = "16";
	
	/**表示不要查出数据的占位符*/
	public static String NULL_FLAG="000";
	
	public static String DUE_EXECUTE_TASK_BEAN = "com.jy.modules.cims.task.dueTask.DueExecuteTaskImpl"; // 到期执行任务执行bean
	
	public static String LOG_TO_DB_FILTER_KEY = "logtodb:";
	//包规则
	/**账单日规则*/
	public static String PACKAGE_RULE_B = "02";
	/**批次规则*/
	public static String PACKAGE_RULE_T = "01";
	
	//贷款还款计划表模板
	/**是否下载还款计划表 01是*/ 
	public static String IS_LOAN_COST_PLAN = "01";
	/**是否下载还款计划表 02否*/ 
	public static String NO_LOAN_COST_PLAN = "02";
	/**下载还款计划表类型*/
	public static String FILE_TYPE = ".xls";
	
	public static String LOAN_CODE = "contractAmount,loanAmount,loanPeriod,monthRate";//dto属性
	public static String LOAN_NAME = "借款金额,放款金额,期数,月利率";//dto属性
	public static String LOAN_COST_PLAN_CODE = "currentTime,startDate,paybackAmount,mustAmount,mustAccrual";//dto属性
	public static String LOAN_COST_PLAN_NAME = "还款期数,还款日,月还金额,还款本金,还款利息";//excel的tital
	
	//募集计划导出
	public static String RAISE_PLAN_NAME="募集计划编号,募集计划名称,募集计划金额,募集计划开始日期,产品期限(天),商户兑付期限(天),起息时间,到期时间,创建时间,募集状态,项目总额,费用编码";
	public static String RAISE_PLAN_CODE="planId,planName,amount,startTime,period,merchantPeriod,startBenefitDate,endBenefitDate,createTime,raiseStatus,itemSum,costCode";
		
	//合作机构导出
	public static String COOPERORG_FORM_NAME="合作机构,账单日,在途,转让,赎回,回款匹配,正常,提前结清";
	public static String COOPERORG_FORM_CODE="cooperorgName,billDate,ztMakeCreditorValue,zrMakeCreditorValue,shMakeCreditorValue,rcMakeCreditorValue,zcMakeCreditorValue,tqMakeCreditorValue";
	
	//影像文件导出
	public static String IMGURL_FILE_EXPORT_NAME = "客户编号,合同号,附件名称,附件编码,附件URL";
	public static String IMGURL_FILE_EXPORT_CODE = "custNo,contractNo,attachName,attachCode,attachUrl";
	
	//结算计划模板
	public static String COST_PLAN_FILE_EXPORT_NAME = "债权编号,转让编号,当前期次 ,当期还款日,应还本,应还息,应匹配金额,应返还金额,本期还款金额,结算状态";
	public static String COST_PLAN_FILE_EXPORT_CODE = "creditorCode,transferId,currentTime,startDate,mustAmount,mustAccrual,matchAmount,returnAmount,thisRepaySum,planStatus";
	public static String COST_PLAN_FILE_EXPORT_IS = "01,01,01,01,01,01,01,01,01,01";
	//证大还款导出
	public static String PLATFORMPLAN_RESULT_EXPORT_NAME ="债权编号,期数,应还时间,合作机构,应还本金,应还利息,应还总金额,本金余额,一次性还款总额 ";//贷款查询结果名称 
	public static String PLATFORMPLAN_RESULT_EXPORT_CODE ="creditorCode,currentTime,startDate,cooperorgName,mustAmount,mustAccrual,summustAmount,principalBalance,onemustAmount";//证大还款计划结果
			
	//贷款明细导出
	public static String LOADDEATIL_RESULT_EXPORT_NAME ="流水号,合同号,客户号,客户名称,包号,贷款产品,贷款产品名称,贷款期数,借款用途,合同金额 ,放款金额,合作机构名称 ,贷款状态,是否紧急扣回,异常状态 ";//贷款查询结果名称 
	public static String LOADDEATIL_RESULT_EXPORT_CODE ="dealCode,contractNo,custCode,loanAcctName,creditPackageName,productCode,productName,loanPeriod,loanPurposeName,contractAmount,loanAmount,cooperorgName,loanStatusName,RiskCustomerYn,abnormalStatus";//贷款查询结果属性 
		
	//债权明细导出
	public static String CREDIT_RESULT_EXPORT_NAME ="转让编号,债权编号,机构债权编号,姓名,身份证号码,合作机构,债权包,我司债权包,产品类型,还款方式,还款期数,年化利率,交割日期,计划赎回日期,月还金额,初始债权价值,本次转让债权价值,当前债权价值,债权来源,债权状态,核心债权状态,债权交互状态";//债权结果名称 
	public static String CREDIT_RESULT_EXPORT_CODE ="transferId,creditCode,cooperorgTransferId,custName,cardId,cooperorgName,packageNum,cooperorgPackageName,productType,repayType,repayPeriod,planCreditorRield,deliverDate,planRedeemDate,thisRepaySum,initialCreditorValue,thisMakeCreditorValue,thisCreditorValue,creditSource,creditorStatusName,coreState,creditEachStatus";//债权查询结果属性 
	
	//未来每日赎回债权量
	public static String CREDIT_PLAN_REDEEM_VALUE_NAME ="债权包号,合作机构,产品类型,转让日期,转让价值,账单日,债权状态,赎回日期,债权价值";//债权结果名称 
	public static String CREDIT_PLAN_REDEEM_VALUE_CODE ="packageNum,cooperorgCodeName,productType,deliverDate,thisMakeCreditorValue,billDate,creditorStatus,planRedeemDate,planRedeemValue";//债权查询结果属性 
		
	//月还结算
	public final static String CREDIT_SETTLEBILL_CODE = "creditCode,transferId,borrowerName,borrowerIdNumber,contractSum,loanSum,initialCreditorValue,thisMakeCreditorValue,thisCreditorValue,repayDate,currentTime,repayPeriod,mustAmount,mustAccrual,matchAmount,returnAmount,repayStartDate,thisRepaySum,loanProductName,replaceType,creditorStatus,abnormalSettle,creditSource,cooperorgName,contractName,agreementName,packageNum,settleApplyId,dealCode,backFee,settlementSignName,bizDate";
	public final static String CREDIT_SETTLEBILL_NAME = "债权编号,转让编号,借款人姓名,借款人身份证,合同金额,放款金额,初始债权价值,本次转让债权价值,当前债权价值,结算日期,当前期数,总还款期数,应还本,应还息,应匹配金额,应返还金额,还款起始日期,本次还款金额,产品名称,月还处理方式,债权状态,异常结清类型,债权来源,合作机构名称,合约名称,协议名称,债权包,结算申请编号,交易流水号,退费金额,结算标识,结清日期";
			
	public final static String CREDIT_SETTLEBILL_ISIMPORT = "01,01,02,02,02,02,02,02,02,01,01,02,02,02,02,02,02,02,02,02,02,01,02,02,02,02,02,01,01,01,01,02";
	
	//债权计划赎回日期补录
	public final static String CREDIT_PLANREDEEMDATE_CODE = "creditCode,transferId,planRedeemDate";
	public final static String CREDIT_PLANREDEEMDATE_NAME = "债权编号,转让编号,计划赎回日期";
			
	public final static String CREDIT_PLANREDEEMDATE_ISIMPORT = "01,01,01";
	
	
	//铜板街报表导出
	public static String TBJ_AUDIT_RESULT_EXPORT_NAME ="包号,审批成功数量,审批成功合同金额,审批成功放款金额,审批失败数量,审批失败合同金额,审批失败放款金额";//审核结果名称 
	public static String TBJ_AUDIT_RESULT_EXPORT_CODE ="packageCode,auditSuccCount,auditSuccContractAmount,auditSuccLoanAmount,auditLoseCount,auditLoseContractAmount,auditLoseLoanAmount";//审核结果属性 
	
	public static String TBJ_LOAN_RESULT_EXPORT_NAME ="包号,放款成功数量,放款成功合同金额,放款成功放款金额,放款失败数量,放款失败合同金额,放款失败放款金额";//审核结果名称 
	public static String TBJ_LOAN_RESULT_EXPORT_CODE ="packageCode,loanSuccCount,loanSuccContractAmount,loanSuccLoanAmount,loanLoseCount,loanLoseContractAmount,loanLoseLoanAmount";//审核结果属性
	
	//铜板街募集计划与贷款转出包对照关系导出
	public final static String TBJ_RAISE_PLAN_CODE = "planId,planName,amount,creditPackageName,cnt,contractAmount,loanAmount,billDate,raiseStatus";//dto属性
	public final static String TBJ_RAISE_PLAN_NAME = "募集计划编号,募集计划名称,募集计划金额,包号,转出贷款的数量,合同金额,放款金额,账单日,募集状态";//excel的title
		
	//自动匹配月还债权预留金额试算
	public final static String QUOTA_ESTIMATE_CODE = "cooperorgName,agreementName,contractName,packageName,startDate,repayAmount,matchAmount,returnAmount";
	public final static String QUOTA_ESTIMATE_NAME = "合作机构,协议名称,合约名称,债权包,结算日期,月还总金额,应匹配金额,应返还金额";
	
	//按明细赎回模板
	public final static String REDEMPTION_DETAIL_CODE = "borrowerIdNumber,borrowerName,creditCode,initialLoanDate,loanMonthlyinterest,loanProductName,repayEntDate,repayPeriod,repayStartDate,residueRepayPeriod,thisCreditorValue,thisRepaySum,transferId,dealCreditorStatus,redeemDate,ThisMakeCreditorValue,cautionMoney,costState,cardType";
	public final static String REDEMPTION_DETAIL_NAME = "借款人身份证号,借款人姓名,债权编号,初始放款日期,月利率,产品类型,还款结束日期,还款期数,还款起始日期,剩余还款期数,当前债权价值,本期还款金额,转让编号,交互状态,赎回日期,赎回债权价值,保证金,结算标示,证件类型";
	
	/**还款计划导出路径*/
	public static String LOAN_COST_PLAN_URL = "file.store.url";
	
	/**是否检查账单日*/ 
	public final static boolean CHECK_BILL_DATE = false;
	
	/**是否过滤债权(true:过滤; false:不过滤)*/ 
	public final static boolean FILTER_CREDIT_DETAIL = false;
		
	/**多线程执行器线程启动数量*/ 
	public static int MULTIRUNNER_INIT_THREAD_NUM = 3;
	
	/** 贷款放款结果查询批次量*/
	public static int LOAN_DEAL_RESULT = 100;
	
	/**捷越公司机构编码*/ 
	public final static String COOPERORG_CODE_JY = "JY";
	/**铜板街公司机构编码*/ 
	public final static String COOPERORG_CODE_TBJ = "TBJ";
			
	/**关联类型 (01二次购买 )*/
	public final static String RELE_TYPE_SECOND_BUY = "01";
	/**02结算管理*/
	public final static String RELE_TYPE_SETTLE_MANAGE = "02";
	
	/**募集类型(01:债权; )*/
	public final static String RAISE_TYPE_CRE = "01";
	/**02:贷款*/
	public final static String RAISE_TYPE_LOA = "02";
	
	/**募集状态(01:募集中; )*/
	public final static String RAISE_STATUS_BEGIN = "01";
	/**02:募集完成*/
	public final static String RAISE_STATUS_END = "02";
	
	/**铜板街是否验证募集计划*/
	public final static boolean TBJ_CHECK_RAISE = PropertyUtil.get("tbj.check.raise")==null?true:(("Y".equalsIgnoreCase(PropertyUtil.get("tbj.check.raise"))||"true".equalsIgnoreCase(PropertyUtil.get("tbj.check.raise")))?true:false);
	
	/**是否获取押品系统影像文件(true:获取; false:不获取)*/ 
	public final static boolean COLLATERAL_RESULT = PropertyUtil.get("collateral.check.flag")==null?false:(("Y".equalsIgnoreCase(PropertyUtil.get("collateral.check.flag"))||"true".equalsIgnoreCase(PropertyUtil.get("collateral.check.flag")))?true:false);
	
	/**铜板街发送接口类型*/
	/**list集合*/
	public final static String TBJ_SEND_TYPE_LIST = "LIST"; 
	/**单条*/
	public final static String TBJ_SEND_TYPE_ONE = "ONE"; 
	
	//Spring Batch 批处理影像文件
	public final static String SB_LOAN_DETAIL_DTO = "SB_LOAN_DETAIL_DTO";
	public final static String SB_LOAN_DETAIL_CONTRACTNO = "SB_LOAN_DETAIL_CONTRACTNO";
	public final static String SB_TEMP_DIR = "SB_TEMP_DIR";
	public final static String SB_TEMP_ZIP = "SB_TEMP_ZIP";
	public final static String SB_IMAGES_STATUS = "SB_IMAGES_STATUS";
	public final static String SB_SUCCESS_FTP_URL = "SB_SUCCESS_FTP_URL";
	
	// 执行状态：00-未处理；01-处理中；02-处理完成；03-处理异常
	/**执行状态：00-未处理*/
	public final static String EXE_STATUS_UNPROCESSED = "00";
	/**01-处理中*/
	public final static String EXE_STATUS_BEGIN = "01";
	/**02-处理完成*/
	public final static String EXE_STATUS_END = "02";
	/**03-处理异常*/
	public final static String EXE_STATUS_ERROR = "03";
	
	// 捷越和向上/向前系统交互接口返回码：0000：成功   9999：失败  
	/**0000：成功  */
	public static final String JIEYU_RET_CODE_SUC = "0000"; 
	/**9999：失败  */ 
	public static final String JIEYU_RET_CODE_FAIL = "9999";  
	
	
	// 核心系统接口返回码：0000：成功  0001：失败  9999:日终处理中
	/**0000：成功  */
	public static final String RET_CODE_SUC = "0000"; 
	/**0001：失败  */ 
	public static final String RET_CODE_FAIL = "0001";    
	/** 9999:日终处理中*/
	public static final String RET_CODE_DEAL = "9999";   
	
	/**TIMEOUT:超时*/ 
	public static final String RET_CODE_TIMEOUT = "TIMEOUT";  
	/**NOINVOKE：无需调用*/ 
	public static final String RET_CODE_NO_INVOKE = "NOINVOKE";     
	
	/** 事务定义 */
	public static final String COOPERORG_TRANS_EN_NAME_T001 = "loanTransferRedeemToCoreTx";   //贷款回购交易发送核心整体事务
	/** 事务A */
	public static final String COOPERORG_TRANS_T001_A = "A"; 
	/** 事务B */
	public static final String COOPERORG_TRANS_T001_B = "B"; 
	
	/**调用事务最大执行次数*/
	public static final int COOPERORG_TRANS_MAX_EXEC_TIMES = 3; 
	
	/**
	 * 是否跨账单日 1-是 0-否*
	 */
	public static String COOPERORG_IS_CROSS_BILLDATE_YES = "1"; 
	/**
	 * 是否跨账单日 1-是 0-否*
	 */
	public static String COOPERORG_IS_CROSS_BILLDATE_NO = "0"; 
	
	public static final String FLAG_YES = "Y";// 标记,Y-是
	public static final String FLAG_NO = "N";// 标记, N-否
	
	public static boolean mmediatelyQuery = false;
	
	/** * 资金存管-未划扣* */
	public static String FUNDS_REPAY_STATUS_00 = "00";//未划扣
	/** * 资金存管-划扣成功* */
	public static String FUNDS_REPAY_STATUS_01 = "01";//划扣成功
	/** * 资金存管-划扣失败* */
	public static String FUNDS_REPAY_STATUS_02 = "02";//划扣失败
	/** * 资金存管-已贴息* */
	public static String FUNDS_REPAY_STATUS_03 = "03";//划扣失败
	

	/** * 资金存管-正常* */
	public static String FUNDS_REPAY_TYPE_01 = "01";//正常
	/** * 资金存管-逾期* */
	public static String FUNDS_REPAY_TYPE_02 = "02";//逾期
	/** * 资金存管-提前结清* */
	public static String FUNDS_REPAY_TYPE_03 = "03";//提前结清
	/** * 资金存管-贴息* */
	public static String FUNDS_REPAY_TYPE_04 = "04";//提前结清
	

	/** * 资金存管-未垫付* */
	public static String FUNDS_RISK_STATUS_00 = "00";//未垫付
	/** * 资金存管-已垫付* */
	public static String FUNDS_RISK_STATUS_01 = "01";//已垫付
	/** * 资金存管-老数据* */
	public static String FUNDS_RISK_STATUS_02 = "02";//老数据
	
	/** * 资金存管-未处理* */
	public static String FUNDS_IS_DEAL_00 = "00";//未处理
	/** * 资金存管-已处理* */
	public static String FUNDS_IS_DEAL_01 = "01";//已经处理
	
    /**
     * 接口异常发送邮件地址
     */
    public static String INTERACT_EMAIL_SERVER = "interact.email_server";
	
    public static String INTERACT_INTERVAL ="interact.interval";
	static {
		map.clear();
		map.put(CimsConstant.BIZNO_TYPE_CRTO, CimsConstant.BIZNO_PF_CRTO);
		map.put(CimsConstant.BIZNO_TYPE_LOAN, CimsConstant.BIZNO_PF_LOAN);
		map.put(CimsConstant.BIZNO_TYPE_QUOTA, CimsConstant.BIZNO_PF_QUOTA);
		map.put(CimsConstant.BIZNO_TYPE_DEAL, CimsConstant.BIZNO_PF_DEAL);
		map.put(CimsConstant.BIZNO_TYPE_BPFILE, CimsConstant.BIZNO_PF_BPFILE);
		map.put(CimsConstant.BIZNO_TYPE_REDEMPTION, CimsConstant.BIZNO_PF_REDEMPTION);
		map.put(CimsConstant.BIZNO_TYPE_CRTI, CimsConstant.BIZNO_PF_CRTI);
		map.put(CimsConstant.BIZNO_TYPE_CRSR, CimsConstant.BIZNO_PF_CRSR);
		map.put(CimsConstant.BIZNO_TYPE_SRSH, CimsConstant.BIZNO_PF_SRSH);
		map.put(CimsConstant.BIZNO_TYPE_SETTLE, CimsConstant.BIZNO_PF_SETTLE);
	}

	/**
	 * 转化为json
	 * 
	 * @Title toJson
	 * @Description TODO
	 * @return
	 * @throws IllegalArgumentException
	 * @throws IllegalAccessException
	 *             String
	 * @author lixinyao
	 * @date 2015-1-31-上午11:54:28
	 * @update
	 * @throws
	 */
	public static String toJson() throws IllegalArgumentException, IllegalAccessException {
		Map<String, Object> jsonMap = new HashMap<String, Object>();
		Field[] fields = CimsConstant.class.getFields();
		for (Field field : fields) {
			jsonMap.put(field.getName(), field.get(CimsConstant.class));
		}
		return JSON.toJSONString(jsonMap);
	}
	
	public static Map<String, String> doUpdateCreditValueJobMap = new LinkedHashMap<String, String>();
	public static Map<String, String> doCreatPlanJobMap = new LinkedHashMap<String, String>();
	
	public static Map<String, String> unlockQuotaMap = new LinkedHashMap<String, String>();
}
